export default {
    data () {
        return {
            userId: '',
            tokenId: '',
            projectId: '',
            userInfo: '',
            classValue: false,
            theModel: [],
            areaList: [],
            areaValue: false
        }
    },
    computed: {
        changedata () {
            return this.$store.state.workrist
        }
    },
    watch: {
        changedata () {
            this.classValue = false
            // this
            this.dataList.deptName = this.$store.state.companyworklist.deptName
            this.dataList.deptId = this.$store.state.companyworklist.deptId
        }
    },
    created () {
        this.userInfo = JSON.parse(localStorage.userInfo)
        this.userId = this.userInfo.userid
        this.tokenId = this.userInfo.tokenId
        this.projectId = this.userInfo.deptid
    },
    methods: {
        // 高风险区域
        getArea () {
            let param = {
                'allowPaging': true,
                'business': 'GetAreas',
                'data': {
                    'deptId': this.userInfo.deptid
                },
                'pageIndex': 0,
                'pageSize': 20,
                'tokenId': this.tokenId,
                'userId': this.userId
            }
            this.$axiosAjax.getConfigJson(
                param
            ).then(
                (res) => {
                    this.areaList = res.data.data
                }
            )
        },
        showclass () {
            this.classValue = true
        },
        showmsg () {

        },
        showArea () {
            this.areaValue = true
        }
    }
}
